/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package mesaayuda.model;

import java.io.Serializable;
import java.util.Collection;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 *
 * @author Juany
 */
@Entity
@Table(name = "CAUSASCERRARTICKET")
@NamedQueries({
    @NamedQuery(name = "Causascerrarticket.findAll", query = "SELECT c FROM Causascerrarticket c")})
public class Causascerrarticket implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @Column(name = "ID_CAUSASCERRARTICKET")
    private Integer idCausascerrarticket;
    @Column(name = "DESCRIPCION")
    private String descripcion;
    @OneToMany(mappedBy = "idCausascerrarticket")
    private Collection<Ticket> ticketCollection;

    public Causascerrarticket() {
    }

    public Causascerrarticket(Integer idCausascerrarticket) {
        this.idCausascerrarticket = idCausascerrarticket;
    }

    public Integer getIdCausascerrarticket() {
        return idCausascerrarticket;
    }

    public void setIdCausascerrarticket(Integer idCausascerrarticket) {
        this.idCausascerrarticket = idCausascerrarticket;
    }

    public String getDescripcion() {
        return descripcion;
    }

    public void setDescripcion(String descripcion) {
        this.descripcion = descripcion;
    }

    public Collection<Ticket> getTicketCollection() {
        return ticketCollection;
    }

    public void setTicketCollection(Collection<Ticket> ticketCollection) {
        this.ticketCollection = ticketCollection;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idCausascerrarticket != null ? idCausascerrarticket.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Causascerrarticket)) {
            return false;
        }
        Causascerrarticket other = (Causascerrarticket) object;
        if ((this.idCausascerrarticket == null && other.idCausascerrarticket != null) || (this.idCausascerrarticket != null && !this.idCausascerrarticket.equals(other.idCausascerrarticket))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "mesaayuda.model.Causascerrarticket[ idCausascerrarticket=" + idCausascerrarticket + " ]";
    }
    
}
